package com.atguigu.gmall.publisher.mapper;

import com.atguigu.gmall.publisher.bean.UserAction;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserActionMapper {
    @Select( "select sum(home_user_count) huc,\n" +
            "       sum(good_detail_user_count) gduc,\n" +
            "       sum(cart_add_user_count) cauc,\n" +
            "       sum(order_user_count) ouc,\n" +
            "       sum(pay_ment_suc_user_count) pmsu\n" +
            "       from dws_user_action_window\n" +
            "       where toYYYYMMDD(stt) = #{date}")
    List<UserAction> selectUserAction(@Param("date") Integer date);
}
